<template>
    <div style="padding: 20px; box-sizing: border-box;">   
        <input type="file" value="点击上传文件" id="file" @change='onUpload'>
    </div>
</template>

<script>

import { upload } from 'api/statisticalQuery/order/index'
    export default {
        methods: {
            // 上传成功后的回调
            onUpload(e){
                const obj = new FormData();
                obj.append('apk', e.target.files[0])
                upload(obj)
                .then(res => {
                     if (res.status === 200) {
                        this.$message({
                            showClose: true,
                            message: this.$t('rule.uploadSus'),
                            type: 'success'
                        });
                    }
                })
            }
        }
    }
</script>

<style scoped>

</style>